<?php 
class SignMd5Helper 
{
	public static function verify($data, $sign, $token)
	{
		$signCal = self::genSign($data, $token);
		
		return $signCal == $sign;
	}
	
	public static function genSign($data, $token)
	{
		$dataDe = json_decode($data, true);
		$timestamp = empty($dataDe['timestamp'])? '' : $dataDe['timestamp'];
		
		return strtolower(
			md5(
				$data . '&' . $timestamp . $token
			)
		);
	}
}